﻿using System;
using System.Net;
using System.Xml.Linq;
using System.Linq;

namespace ArmoryBrowser.Entities
{
    public class CharacterBars
    {
        #region Fields
        private Health _healthField;
        private SecondBar _secondBarField;
        #endregion
        #region Properties
        public Health Health
        {
            get
            {
                return this._healthField;
            }
            set
            {
                this._healthField = value;
            }
        }

        public SecondBar SecondBar
        {
            get
            {
                return this._secondBarField;
            }
            set
            {
                this._secondBarField = value;
            }
        }
        #endregion
        #region Constructor
        public CharacterBars(XElement element)
        {
            Health = element.Elements("health").Select(e => new Health(e)).FirstOrDefault();
            SecondBar = element.Elements("secondBar").Select(e => new SecondBar(e)).FirstOrDefault();
        }
        #endregion
    }
}
